package com.cjy.map;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;

public class Mapdemo {
    public static void main(String[] args) throws IOException {
        FileReader in = new FileReader(new File("E:\\Java\\a.txt"));
        BufferedReader br = new BufferedReader(in);
        String nextLine = br.readLine();
        String[] ss = nextLine.split(" ");
        HashMap<String,Integer> map = new HashMap<>();
        while (null!=nextLine){
            for (String s :ss){
                if (map.containsKey(s)){
                    map.put(s,map.get(s)+1);
                }else {
                    map.put(s,1);
                }
            }
            System.out.println(map);
            nextLine = br.readLine();
        }
        in.close();
    }


}
